1. Technical Field
This invention generally relates to object-oriented computer systems and more specifically relates to versioning for object-oriented systems.
2. Background Art
The development of the EDVAC computer system of 1948 is often cited as the beginning of the computer era. Since that time, computer systems have evolved into extremely sophisticated devices, and computer systems may be found in many different settings. Computer systems typically include a combination of hardware (e.g., semiconductors, circuit boards, etc.) and software (e.g., computer programs). As advances in semiconductor processing and computer architecture push the performance of the computer hardware higher, more sophisticated computer software has evolved to take advantage of the higher performance of the hardware, resulting in computer systems today that are much more powerful than just a few years ago.
Computer systems typically include operating system software that controls the basic function of the computer, and one or more software application programs that run under the control of the operating system to perform desired tasks. For example, a typical IBM Personal Computer may run the OS/2 operating system and, under the control of the OS/2 operating system, a user may execute an application program, such as a word processor. As the capabilities of computer systems have increased, the software programs designed for high performance computer systems have become extremely powerful. Additionally, software development costs continue to rise because more powerful and complex programs take more time, and hence more money, to produce.
One way in which the performance of application software programs has been improved while reducing the associated development costs is by the use of object-oriented programming concepts. The goal of using object-oriented programming is to create small, reusable sections of program code known as "objects" that can be quickly and easily combined and re-used to create new programs. This is similar to the idea of using the same set of building blocks again and again to create many different structures. The modular and re-usable aspects of objects will typically speed development of new programs, thereby reducing the costs associated with the development cycle. In addition, by creating and re-using a comprehensive set of well-tested objects, a more stable, uniform, and consistent approach to developing new computer programs can be achieved. Closely connected with objects is the concept of "classes" of objects. A class is a formalized definition of a set of like objects. As such, a class can be thought of as an abstraction of the objects or as a definition of a type of object. Each object that is created in an object-oriented system is an instance of a particular class.
Computer programs naturally evolve over time. The evolution of object-oriented computer programs entails defining new objects that have implementations different than previous versions. As time passes, the type and quantity of information stored by these objects may need to be changed or enhanced to accommodate additional or different data types. In this case, the definition of the object will, of necessity, be changed to support the new object data storage requirements. This scenario typically occurs when a program is upgraded from a first software version to a newer, more powerful version of the program. A new release of an existing program may use a combination of new objects and previously implemented objects that were defined in an earlier version. The processes and activities associated with modifying, updating, and tracking changes in a class over a period of time are known as "versioning."
When the current version of an object is going to be updated, a copy of the original object may be made. This copy is made in order to preserve the state data of the original object. The state data of this copy is created based on the state data of the original object. The copy of the original object is a new object with a new object identity. It can be understood that once a version update is performed on an object, two versions of the object exist. The original object still exists with its original state data and object identity, and the new object exists with its new object identity and new version of state data.
Existing related objects reference one another to call methods and share data. In order to access a particular object, each existing related object has a pointer which references the object identity associated with the particular object. Typically, each existing related object has only one pointer that can be used to reference an object and, accordingly, each existing related object typically references only one particular version of that object. An existing related object references the version of the object whose object identity has been assigned to the pointer.
As mentioned, existing object-oriented systems allow only one version of a particular object. However, it is frequently necessary for an object-oriented system to maintain multiple versions of an object. Existing object-oriented systems are generally unable to maintain multiple versions of a given object.
For example, in order to track annual sales figures for their products, a sales corporation may create an object in an object oriented system called "Yearly Sales." All of the objects that need to reference the Yearly Sales object will contain a pointer to the Yearly Sales object. At the end of each month, the sales data for the proceeding month is entered into the Yearly Sales object, providing a cumulative figure for the company's year-to-date sales. However, before the data for the preceeding month is entered, the system makes a copy of the object before the update. For example, before adding the sales data for the month of May to the Yearly Sales object, a copy of the Yearly Sales object will be made which will include data for the months of January through April, assuming the corporation's sales year begins in January. After adding data for the month of May, five versions of the Yearly Sales object exist: one object containing January sales data, one object containing January-February sales data, one object containing January-March sales data, one object containing January-April sales data and one object containing January-May sales data. However, since related objects in the object-oriented system have only a single reference pointer, the only object that can be accessed is the version of the Yearly Sales object that contains the year-to-date sales data.
The sales corporation may have an Accounting Department and a Purchasing Department. The Accounting Department needs to spend part of the month of May analyzing the cumulative sales data contained in the Yearly Sales object through the month of April. No data for the month of May should be included in their analysis. Only the information contained in the January through April version of the Yearly Sales object is relevant for the calculations used in the Accounting Department's analysis. However, the Purchasing Department needs the most current sales data available so that product inventory can be adjusted to reflect developing market trends. Therefore, the Purchasing Department needs the version of the Yearly Sales object with contains the information on sales to date, including January through May.
As previously mentioned, the objects in the object-oriented system can only reference one version of the Yearly Sales object. Using current object-oriented technology, it is impossible for both the Accounting Department and the Purchasing Department to reference the respective desired version of the Yearly Sales object because the system recognizes only a single Yearly Sales object. This significant limitation will prevent object-oriented solutions from being developed for many environments that otherwise might benefit from the adoption of an object-oriented systems approach.
Without a mechanism for allowing multiple different versions of an object, the undesirable limitations of present systems will continue to restrict the development and adoption of object-oriented solutions. In turn, many businesses will not fully realize the potential benefits of object-oriented systems.